//***********************************************************************************
// Test NPC object for level abstraction

// Author: Aravindh U095232L

//***********************************************************************************

//NPC object
function npc(x,y)
{

	this.id =1;
	this.level = 0;
	this.prev_level = 0;

	this.pos_x = x;
	this.pos_y = y;
	this.width = 20;
	this.height = 20;
	this.orientation = 0;
	this.grid = [];
	this.see = [];

	this.influence = 0;

	this.play = new Image();
	this.play.src = "Images/npc.png";

	this.temp =0;

	this.rand_move = function()
	{
		
		if(this.pos_y<0)
			this.temp=1;
		else if(this.pos_y>500)
			this.temp=0;

		if(this.temp == 0)
			this.pos_y-=1;
		else
			this.pos_y+=1;


	}

	this.level_2 = function()
	{


	}

	//Player rendering function
	this.draw=function()
	{
	ctx.drawImage(this.play, this.pos_x, this.pos_y,this.width,this.height);
	}

}